package com.haojii.jdo.orm.many2many;

import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class EasytvItem {

	public EasytvItem(String itemTitle, String itemLink) {
		super();
		this.key = KeyFactory.createKey(EasytvItem.class.getSimpleName(), itemLink);
		this.itemTitle = itemTitle;
		this.itemLink = itemLink;
	}
	@Override
	public String toString() {
		return "EasytvItem [itemLink=" + itemLink + ", itemTitle=" + itemTitle
				+ "]";
	}
	
	@PrimaryKey
    private Key key;
	
	//@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	
	@Persistent
	String itemTitle;
	
	@Persistent
	String itemLink;
	
	public String getItemTitle() {
		return itemTitle;
	}
	public void setItemTitle(String itemTitle) {
		this.itemTitle = itemTitle;
	}
	public String getItemLink() {
		return itemLink;
	}
	public void setItemLink(String itemLink) {
		this.itemLink = itemLink;
	}


}
